Skip to content

fix(adk): remove direct log.Printf calls from retryModelWrapper#978

Open
octo-patch wants to merge 1 commit into
cloudwego:mainfrom
octo-patch:fix/issue-938-remove-log-from-retry-chatmodel
Open

fix(adk): remove direct log.Printf calls from retryModelWrapper#978
octo-patch wants to merge 1 commit into
cloudwego:mainfrom
octo-patch:fix/issue-938-remove-log-from-retry-chatmodel

Conversation

@octo-patch

Copy link
Copy Markdown

Fixes #938

Problem

retry_chatmodel.go calls log.Printf directly for retry events, which outputs to the user's terminal and interferes with their application output (e.g., TUI applications).

Solution

Remove all three log.Printf calls. Users can already observe retry events via the WillRetryError emitted through AgentEvent, and can implement custom logging in their IsRetryAble callback if needed.

Testing

The behavior change is straightforward: retry attempts no longer print to the terminal. Existing tests continue to pass since they don't assert on log output.

Remove the three log.Printf calls in retry_chatmodel.go that output retry
events directly to the user terminal. Users can observe retry events via
the WillRetryError emitted through AgentEvent, and can implement their own
logging via IsRetryAble callbacks if needed.

Fixes cloudwego#938
@shentongmartin shentongmartin added C-bugfix Category: This is a PR that fixes a bug. D-adk Domain: this is an issue related to the adk package labels Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bugfix Category: This is a PR that fixes a bug. D-adk Domain: this is an issue related to the adk package

Development

Successfully merging this pull request may close these issues.

关于adk/retry_chatmodel.go中log输出的问题

2 participants